package com.fan.controller;

import com.fan.entity.UserEntity;
import com.fan.service.DemoService;
import com.fan.service.UserService;
import com.fan.vo.DemoVO;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class TestController {

    @Resource
    private DemoService demoService;

    @RequestMapping("/hello")
    public String hello() {
        return "hello world";
    }

    @RequestMapping("/saveUser")
    public DemoVO saveUser(UserEntity userEntity) {
        DemoVO demoVOById = demoService.getDemoVOResultMapById();
        System.out.println(demoVOById);
        return demoVOById;
    }
}
